<!DOCTYPE HTML>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
  <link rel="stylesheet" href="css/example.css">
  <!-- This is what you need -->
  <script src="js/sweet-alert.js"></script>
  <link rel="stylesheet" href="css/sweet-alert.css">
  <!--.......................-->

</head>

<body>
	<button>Try me!</button>
<script>

document.querySelector('button').onclick = function(){
    swal({
        title: "系统出错!",
        text: "请刷新页面，或联系管理员！",
        type: "error",
        confirmButtonText: '关闭'
    });
};

</script>

</body>

</html>
